fix: align Python API to MATLAB signatures (5 critical mismatches)#73
Merged
iahncajigas merged 7 commits intomainfrom Mar 22, 2026
Merged
fix: align Python API to MATLAB signatures (5 critical mismatches)#73iahncajigas merged 7 commits intomainfrom
iahncajigas merged 7 commits intomainfrom
Conversation
1. ConfidenceInterval: add SignalObj-compatible methods (getSigInTimeWindow, windowedSignal, shift, resample, derivative, merge, copySignal, etc.) matching MATLAB's inheritance from SignalObj 2. FitResult.getCoeffs: now returns (coeffMat, labels, SEMat) 3-tuple matching MATLAB [coeffMat, labels, SEMat] = getCoeffs(fitObj, fitNum) 3. FitResult.getHistCoeffs: same 3-tuple return matching MATLAB 4. nstColl.psthGLM: accepts MATLAB-compatible params (basisWidth, history, fitType, selectorArray, minTime, maxTime, sampleRate) while keeping Python aliases (binwidth, windowTimes) 5. kalman_filter: accepts both MATLAB positional (A, C, Pv, Pw, Px0, x0, y) and Pythonic keyword (observations, transition, ...) signatures Also fixes: - matplotlib boxplot tick_labels → labels (pre-existing compat issue) - Regenerates notebook_fidelity.yml with current date - Updates all call sites for getCoeffs/getHistCoeffs 3-tuple return Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Notebooks had bare `fitResults.getCoeffs(2)` calls that now return a (coeffMat, labels, SEMat) tuple. Add [0] indexing to extract the coefficient array where needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The committed .ipynb files are executed by CI directly. Regenerate them from the builder scripts (already fixed) so the notebook cells use getCoeffs(n)[0] to extract the coefficient array from the tuple. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use version-aware boxplot kwarg: tick_labels (mpl>=3.9) or labels (older) - Align notebook parity notes from high_fidelity to exact (matches parity_notes.yml) - Regenerate AnalysisExamples.ipynb and AnalysisExamples2.ipynb Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test checks that YAML remaining_differences text appears verbatim in the notebook's parity note cell. Update YAML to match builder output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Auto-extracted fidelity_status and remaining_differences from each committed notebook to ensure the YAML matches the builder output. Several notebooks use high_fidelity (not exact) per their builders. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Report now shows 6 exact + 7 high_fidelity (was 13 exact + 0 high_fidelity) to match actual notebook builder output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns Python API to MATLAB for 5 critical signature mismatches identified by cross-toolbox audit:
< SignalObj)(coeffMat, labels, SEMat)3-tuple matching MATLABbasisWidth,history,selectorArray,minTime,maxTime,sampleRate)tick_labels→labelsmatplotlib compat issueTest plan
🤖 Generated with Claude Code